/**
 * @Description:
 * @author Mr.Kuang
 * @date 2025/1/1
*/
const tdtToken = "f436ca5675f5ad8476c68772d808ec6a";
const cesiumToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNWMwYWU4ZS1mYjJhLTRiODEtOTVkYS0zY2Y3NzRjMTI2OTUiLCJpZCI6MzM1MjAsImlhdCI6MTYwNTAwMTA2Mn0.BiUHe6nuySvtQAiIIwMWSHjPyu0iD1mvw-8otfVkNHs";

const g_config={
    "map3d": {
        "scene": {
            "center": {"lat":31.80502,"lng":117.116219,"alt":2654.4,"heading":0.7,"pitch":-42},
            "scene3DOnly": true,
            contextOptions: {
                requestWebgl2: true
            },
            "shadows": false,
            "removeDblClick": true,
            "sceneMode": 3,
            "showSun": true,
            "showMoon": true,
            "showSkyBox": true,
            "showSkyAtmosphere": true,
            "fog": true,
            "fxaa": true,
            "requestRenderMode": true,
            "globe": {
                "depthTestAgainstTerrain": false,
                "baseColor": "#546a53",
                "showGroundAtmosphere": true,
                "enableLighting": false
            },
            "cameraController": {
                "zoomFactor": 3.0,
                "minimumZoomDistance": 1,
                "maximumZoomDistance": 50000000,
                "enableRotate": true,
                "enableTranslate": true,
                "enableTilt": true,
                "enableZoom": true,
                "enableCollisionDetection": true,
                "minimumCollisionTerrainHeight": 15000
            }
        },
        "token":{
            "tianditu":tdtToken,
            "ion":cesiumToken,
        },
        "control": {
            "homeButton": true,
            "baseLayerPicker": true,
            "sceneModePicker": true,
            "vrButton": false,
            "fullscreenButton": true,
            "navigationHelpButton": true,
            "animation": false,
            "timeline": false,
            "infoBox": false,
            "geocoder": false,
            "selectionIndicator": false,
            "contextmenu": { "hasDefault": true },
            "mouseDownView": true,
            "zoom": { "insertIndex": 1 },
            "compass": { enabled:false },
            "distanceLegend": { "left": "100px", "bottom": "2px" },
            "locationBar": {
                "crs": "CGCS2000_GK_Zone_3",
                "crsDecimal": 0,
                "template": "<div>经度:{lng}</div> <div>纬度:{lat}</div> <div class='hide1000'>横{crsx}  纵{crsy}</div> <div>海拔：{alt}米</div> <div class='hide700'>层级：{level}</div><div>方向：{heading}°</div> <div>俯仰角：{pitch}°</div><div class='hide700'>视高：{cameraHeight}米</div><div class='hide700'>帧率：{fps} FPS</div>"
            }
        },
        "templateValues": {
            "dataServer": "//data.mars3d.cn",
            "gltfServerUrl": "//data.mars3d.cn/gltf"
        },
        "terrain": {
            // "url": "//data.mars3d.cn/terrain",
            // "show": true
            "show":false
        },
        "basemaps": [
            { "id": 10, "name": "地图底图", "type": "group" },
            {
                "id": 2021,
                "pid": 10,
                "name": "天地图影像",
                "icon": "/img/basemaps/tdt_img.png",
                "type": "group",
                "layers": [
                    { "name": "底图", "type": "tdt", "layer": "img_d" },
                    { "name": "注记", "type": "tdt", "layer": "img_z" }
                ],
                "show": false
            },
            {
                "pid": 10,
                "name": "天地图电子",
                "icon": "/img/basemaps/tdt_vec.png",
                "type": "group",
                "layers": [
                    { "name": "底图", "type": "tdt", "layer": "vec_d" },
                    { "name": "注记", "type": "tdt", "layer": "vec_z" }
                ]
            },
            {
                "id": 2017,
                "pid": 10,
                "name": "暗色底图",
                "type": "gaode",
                "icon": "/img/basemaps/blackMarble.png",
                "layer": "vec",
                "invertColor": true,
                "filterColor": "#4e70a6",
                "brightness": 0.6,
                "contrast": 1.8,
                "gamma": 0.3,
                "hue": 1,
                "saturation": 0,
                "show": true
            },
            {
                "pid": 10,
                "name": "蓝色底图",
                "icon": "/img/basemaps/bd-c-midnight.png",
                "type": "xyz",
                "url": "http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
                "chinaCRS": "GCJ02",
                "enablePickFeatures": false
            },
        ],
        "layers": [
            { "pid": 60, "type": "terrain", "name": "Mars3D地形", "terrain": { "type": "xyz", "url": "{dataServer}/terrain" }, "radio": true },
        ]
    },
    "windOptions": {
        age: 80,//粒子最大生存周期,参数越大粒子显示时间越长
        particlesNumber: 1000,//初始粒子总数
        frameRate: 45,//刷新速度 次/s
        speedRate: 1500,//粒子前行速度，决定粒子一步走多远，参数越小跑的线条拖得越长
        height: 50,//基础海拔高度
        lineWidth:3,
    },
    timeLineFrequency:5000,//风场和时间轴切换频率 ms
    //处理后的数据用于构造风场
    extent: [109.03399, 40.52563, 109.04597, 40.53461],
    //风场风速的分段，与颜色搭配使用
    breaks:[0,1.5,3,4.5,6,7.5,9,10.5,12,15],
    colors:["#ffffff","#65ABD1", "#90E4A7", "#F3F486","#FFCB00", "#F49D71"
        , "#D56461", "#A74669", "#701F69", "#4C0669", "#4C0669"],
}
